<script setup lang="ts">
import { getCurrentInstance, ref, onMounted, nextTick } from 'vue'
const { proxy } = getCurrentInstance()

/* ---- */
const props = defineProps<{
  curTabs: Boolean
  items: objAct
}>()

/* ---- */
const show = ref(false)

/* ---- */
const getAuditFun = (type, item) => {
  switch (Number(type)) {
    case 1: {
      item.callback && item.callback(item)
      break
    }
  }
}

/* ---- */
onMounted(() => {
  setTimeout(() => { show.value = true }, 300)
})
</script>

<template>
  <transition name="fade">
    <div class="tabfix xw-anim xw-visible" v-if="curTabs && show">
      <template v-for="(item, index) in items">
        <a class="xw-flex xw-flex-center xw-flex-column" :class="item.style" @click="getAuditFun(1, item)" v-if="item.show">
          <em :class="item.icon" v-if="item.icon"></em><span v-html="item.name" v-if="item.name"></span>
        </a>
      </template>
    </div>
  </transition>
</template>
